package top.wuliaodebaozi2.yunpan;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

public class SettingsBoardFragment extends Fragment{

    private SettingsBoardFragment(){}
    private static SettingsBoardFragment settingsBoardFragment = new SettingsBoardFragment();
    public static Fragment newInstance(){
        return settingsBoardFragment;
    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        super.onCreateView(inflater, container, savedInstanceState);
        View view = inflater.inflate(R.layout.fragment_settings, null);
        view.findViewById(R.id.bt_privacy).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), PrivacyPolicyAndUserAgreementActivity.class);
                intent.putExtra("PrivacyPolicyType",0);
                startActivity(intent);
            }
        });
        view.findViewById(R.id.bt_user).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), PrivacyPolicyAndUserAgreementActivity.class);
                intent.putExtra("PrivacyPolicyType",1);
                startActivity(intent);
            }
        });
        return view;
    }

}
